package org.henau.EmergencyHandlerChain;

// 2. 紧急事件类 (EmergencyEvent.java)
public class EmergencyEvent {
    private final EmergencyType type;
    private final String code;
    private boolean resolved = false;

    public EmergencyEvent(EmergencyType type, String code) {
        this.type = type;
        this.code = code;
    }

    public EmergencyType getType() {
        return type;
    }

    public String getCode() {
        return code;
    }

    public boolean isResolved() {
        return resolved;
    }

    public void setResolved(boolean resolved) {
        this.resolved = resolved;
    }

    @Override
    public String toString() {
        return type + "[" + code + "]";
    }
}
